<?php

namespace app\index\service\payments;

use app\common\model\Transfer;
use app\common\model\TransferBatch;
use think\Collection;

/**
 * 批量转账异步到账接口
 * TransferBatchInterface
 */
interface TransferBatchInterface
{
    /**
     * 批量发起转账
     * @param TransferBatch $transferBatch
     * @param Collection $collection
     * @return bool true发起成功 false发起不成功
     */
    public function transferBatch(TransferBatch $transferBatch, Collection $collection): bool;

    /**
     * 单笔转账结果查询
     * @param Transfer $transfer
     * @return void
     */
    public function transferResultQuery(Transfer $transfer): ?bool;

    /**
     * 收款账户是否可用（三方支付转账需要的账号）
     * @param $memberId
     * @return bool
     */
    public function isEnableTransfer($memberId): bool;
}
